<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<include file="Common:cssjs" />
</head>
<body>
<div class="subnav">
  <div class="content-menu ib-a blue line-x">
  <a href='javascript:;' class="on"><em>资料修改</em></a><span>|</span> 
  <a href='{:U("Management/manager")}' ><em>管理员管理</em></a> <span>|</span> 
  <a href='{:U("Management/adminadd")}' ><em>添加管理员</em></a> 
  </div>
</div>
<style type="text/css">
	html{_overflow-y:scroll}
</style>
<script type="text/javascript">
  $(document).ready(function() {
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$("#username").formValidator({empty:true,onshow:"不修改用户名请留空。",onfocus:"用户名应该为6-20位之间"}).inputValidator({min:2,max:20,onerror:"用户名应该为2-20位之间"});
	$("#password").formValidator({empty:true,onshow:"不修改密码请留空。",onfocus:"密码应该为6-20位之间"}).inputValidator({min:6,max:20,onerror:"密码应该为6-20位之间"});
	$("#pwdconfirm").formValidator({empty:true,onshow:"不修改密码请留空。",onfocus:"请输入两次密码不同。",oncorrect:"密码输入一致"}).compareValidator({desid:"password",operateor:"=",onerror:"请输入两次密码不同。"});
	$("#email").formValidator({onshow:"请输入E-mail",onfocus:"E-mail格式错误",oncorrect:"E-mail格式正确"}).regexValidator({regexp:"email",datatype:"enum",onerror:"E-mail格式错误"});
  })
</script>
<div class="pad_10">
  <div class="common-form">
    <form name="myform" action="{:U("Management/edit")}" method="post" id="myform">
      <input type="hidden" name="id" value="{$data.id}">
      </input>
      <input type="hidden" name="username" value="{$data.username}">
      </input>
      <table width="100%" class="table_form contentWrap">
        <tr>
          <td width="80">用户名</td>
          <td><input type="text" name="username" id="username" value="{$data.username}" class="input-text"  /></td>
        </tr>
        <tr>
          <td>密码</td>
          <td><input type="password" name="password" id="password" class="input-text">
            </input></td>
        </tr>
        <tr>
          <td>确认密码</td>
          <td><input type="password" name="pwdconfirm" id="pwdconfirm" class="input-text">
            </input></td>
        </tr>
        <tr>
          <td>E-mail</td>
          <td><input type="text" name="email" value="{$data.email}" class="input-text" id="email" size="30">
            </input></td>
        </tr>
        <tr>
          <td>备注</td>
          <td><textarea name="remark" rows="2" cols="20" id="remark" class="inputtext" style="height:100px;width:500px;">{$data.remark}</textarea></td>
        </tr>
        <tr>
          <td>所属角色</td>
          <td><select name="role_id">
              <foreach name="role" item="vo">
                <option value="{$vo.id}" <if condition="$data['role_id'] eq $vo['id'] ">selected</if>>{$vo.name}</option>
                </foreach>
          </select></td>
        </tr>
        <tr>
          <td>状态</td>
          <td><select name="status">
                <option value="1" <if condition="$data['status'] eq 1 ">selected</if>>开启</option>
                <option value="0" <if condition="$data['status'] eq 0 ">selected</if>>禁止</option>
          </select></td>
        </tr>
      </table>
      <div class="bk15"></div>
      <input name="dosubmit" type="submit" value="提交" class="button" id="dosubmit">
    </form>
  </div>
</div>
</body>
</html>